<?
include_once ("libs/common.php");
include_once ("libs/twitter.php");
?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
			<?= get_title() ?>
		</title>
		<style type="text/css">
			@import url(css/main.css);
		</style>
		<script src="js/main.js" type="text/javascript">
		</script>
	</head>
	<body onload="externalLinks();">
		<div id="head">
			<?include("header.php") ?>
		</div>
		<div id="head_bar">
		</div>
		<div id="nav_container">
			<?include("nav.php") ?>
		</div>
		<div id="main">
			Welcome to Charry's website.
			<br/>
			Hi there, thank you for dropping by! On this website, you'll have access to some information, like who I am, what I do, as well as my upcoming activities. 
			I hope this site helps you on... hmmm, i don't know, anyway, please take a few minutes to hang around. And feel free to email me if you have any questions.  
			Go to <a class="link_with_box" href="http://charry.org/mail">http://charry.org/mail</a>
			to get my email or visit my blog:<a class="link_with_box" href="http://www.googlestop.com">http://www.googlestop.com</a>
			, write on <a class="link_with_box" href="friendconnect.php">my wall</a>, for more: <a class="link_with_box" href="http://friendfeed.com/charrywong">http://friendfeed.com/charrywong</a>
			<br/>
			Regards,
			<br/>
			<br/>
			Charry
			<br/>
			<h3>My <a class="link_with_box" href="http://www.douban.com/people/Charry.Wong/" rel="external" title="My DouBan">DouBan</a>:</h3>
			<div>
				<script type="text/javascript" src="http://www.douban.com/service/badge/Charry.Wong/?show=collection&amp;n=12&amp;columns=6&amp;hidelogo=yes&amp;hideself=yes">
				</script>
			</div>
			<h3><a class="link_with_box" href="http://twitter.com/charry" rel="external" title="Follow me on Twitter">Twitter</a> Updates:</h3>
			<div id="twitter">
				<ul>
					<?
					$o = twitter_process("http://twitter.com/statuses/user_timeline/charry.json?count=5");
					
					for ($i = 0; $i < count($o); $i++)
					{
					    $item = $o[$i];
					
					    echo "<li>";
					    $text = $item->{'text'};
					    $text = preg_replace("
										  #((http|https|ftp)://(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie",
					    "'<a class=\"link_with_box\" href=\"$1\" rel=\"external\">$1</a>$4'",
					    $text
					    );
					    echo $text;
					    echo " - <span class='created_at'>".time_f($item->{
					        'created_at'
					    }
					    )." ago</span>";
					    echo "</li>";
					}
					?>
				</ul>
			</div>
		</div>
		<div id="footer">
			<?include("footer.php") ?>
		</div>
	</body>
</html>
